import request from "@/utils/request.js";

/**
 * 新增客户
 * @param params
 * @returns {AxiosPromise}
 */
export function addCustomer(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/addCustomer",
    method: "post",
    data: params
  });
}
/**
 * 客户详情
 * @param params
 * @returns {AxiosPromise}
 */
export function customerDetail(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/customerDetail",
    method: "post",
    data: params
  });
}
/**
 * 客户列表
 * @param params
 * @returns {AxiosPromise}
 */
export function customers(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/customers",
    method: "post",
    data: params
  });
}
/**
 * 修改客户
 * @param params
 * @returns {AxiosPromise}
 */
export function updateCustomer(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/updateCustomer",
    method: "post",
    data: params
  });
}

//客情维护↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
/**
 * 新增沟通记录
 * @param params
 * @returns {AxiosPromise}
 */
export function addCustomerCommunicationRecord(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerCommunicationRecord/addCustomerCommunicationRecord",
    method: "post",
    data: params
  });
}

/**
 * 查看沟通记录详情
 * @param params
 * @returns {AxiosPromise}
 */
export function CustomerCommunicationRecordDetail(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerCommunicationRecord/CustomerCommunicationRecordDetail",
    method: "post",
    data: params
  });
}

/**
 * 沟通记录
 * @param params
 * @returns {AxiosPromise}
 */
export function customerCommunicationRecords(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerCommunicationRecord/customerCommunicationRecords",
    method: "post",
    data: params
  });
}

/**
 * 修改沟通记录
 * @param params
 * @returns {AxiosPromise}
 */
export function updateCustomerCommunicationRecord(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerCommunicationRecord/updateCustomerCommunicationRecord",
    method: "post",
    data: params
  });
}

//全部方法
//addCustomerCommunicationRecord、CustomerCommunicationRecordDetail、customerCommunicationRecords、updateCustomerCommunicationRecord

/**
 * 新增客户备注
 * @param params
 * @returns {AxiosPromise}
 */
export function addCustomerRemark(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerRemark/addCustomerRemark",
    method: "post",
    data: params
  });
}

/**
 * 客户历史备注
 * @param params
 * @returns {AxiosPromise}
 */
export function customerHistoryRemark(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerRemark/customerHistoryRemark",
    method: "post",
    data: params
  });
}

/**
 * 客户备注
 * @param params
 * @returns {AxiosPromise}
 */
export function customerRemark(params) {
  return request({
    url:
      "/teachingPlatformService/api/org/project/customerRemark/customerRemark",
    method: "post",
    data: params
  });
}

/**
 * 可用项目列表
 * @param params
 * @returns {AxiosPromise}
 */
export function listProjectDict(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/template/listProjectDict",
    method: "post",
    data: params
  });
}
/**
 * 操作日志
 * @param params
 * @returns {AxiosPromise}
 */
export function listOperateLog(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/listOperateLog",
    method: "post",
    data: params
  });
}
/**
 * 机构关联的所有项目
 * @param params
 * @returns {AxiosPromise}
 */
export function listProjectByOrgId(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/listProjectByOrgId",
    method: "post",
    data: params
  });
}
/**
 * 项目节点完成设置时间
 * @param params
 * @returns {AxiosPromise}
 */
export function setupNodeFinishTime(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/setupNodeFinishTime",
    method: "post",
    data: params
  });
}

/**
 * 项目设置节点计划时间
 * @param params
 * @returns {AxiosPromise}
 */
export function setupNodePlanTime(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/setupNodePlanTime",
    method: "post",
    data: params
  });
}
/**
 * 设置负责人
 * @param params
 * @returns {AxiosPromise}
 */
export function setupNodeUser(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/setupNodeUser",
    method: "post",
    data: params
  });
}
/**
 * 人员字典
 * @param params
 * @returns {AxiosPromise}
 */
export function listUserDict(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/listUserDict",
    method: "post",
    data: params,
    closeLoading: true
  });
}
/**
 * 可用项目列表
 * @param params
 * @returns {AxiosPromise}
 */
export function listProject(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/listProjectDict",
    method: "post",
    data: params
  });
}
/**
 * 给机构添加新项目
 * @param params
 * @returns {AxiosPromise}
 */
export function addOrgProject(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/addOrgProject",
    method: "post",
    data: params
  });
}
/**
 * 客户项目的启用禁用
 * @param params
 * @returns {AxiosPromise}
 */
export function changeUseFlag(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/changeUseFlag",
    method: "post",
    data: params
  });
}
// /**
//  * 项目设置金额
//  * @param params
//  * @returns {AxiosPromise}
//  */
// export function setupAmount(params) {
//   return request({
//     url: "/teachingPlatformService/api/org/project/manager/setupAmount",
//     method: "post",
//     data: params
//   });
// }
/**
 * 批量添加
 * @param params
 * @returns {AxiosPromise}
 */
export function addCustomerBatch(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/addCustomerBatch",
    method: "post",
    data: params
  });
}
/**
 * 删除项目
 * @param params
 * @returns {AxiosPromise}
 */
export function delProject(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/delProject",
    method: "post",
    data: params
  });
}
/**
 * 项目金额，人员设置
 * @param params
 * @returns {AxiosPromise}
 */
export function updateProjectInfo(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/manager/updateProjectInfo",
    method: "post",
    data: params
  });
}
/**
 * 批量添加
 * @param params
 * @returns {AxiosPromise}
 */
export function importCustomer(params) {
  return request({
    url: "/teachingPlatformService/api/customer/import/importCustomer",
    method: "post",
    data: params
  });
}
/**
 * 客户名称字典
 * @param params
 * @returns {AxiosPromise}
 */
export function listNameDict(params) {
  return request({
    url: "/teachingPlatformService/api/org/project/customer/listNameDict",
    method: "post",
    data: params
  });
}
//全部方法
//addCustomerRemark、customerHistoryRemark、customerRemark
